# -*- coding: utf-8 -*-
from time import sleep

import mod.server.extraServerApi as serverApi
from enchantBase import EnchantBase


class StepWind(EnchantBase):
    def __init__(self, system, playerId, enchantData, levels):
        EnchantBase.__init__(self, system, playerId, enchantData, levels)

    def onEnter(self):
        comp = serverApi.GetEngineCompFactory().CreateFly(self.playerId)
        comp.ChangePlayerFlyState(True)

    def onExit(self):
        comp = serverApi.GetEngineCompFactory().CreateFly(self.playerId)
        comp.ChangePlayerFlyState(False)

    def isArmorEnchant(self):
        return True

    def fly(self, args):
        pass

